#pragma once

#include  "iostream"
#include  "vector"
#include  "stack"
#include  "unordered_map"
#include   "queue"

using namespace std;


int peakIndexInMountainArray(vector<int> &arr) {
    int temp = arr[0];
    for (int i = 1; i < arr.size(); ++i) {

        if (arr[i] < temp)
            return i - 1;
        temp = arr[i];

    }
    return 0;
}